package com.sensePlusVR.utils;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * 设置recycle行间距
 * @author: Loren
 * @create: 2016-7-29下午5:14:01
 * @desc: 
 *
 */
@SuppressWarnings("deprecation")
public class RecycleViewUtils extends RecyclerView.ItemDecoration {
    private int resId;
    public RecycleViewUtils(int ResId) {
        this.resId=ResId;
    }

	@Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        MyLog.v("tag_size",parent.getChildPosition(view)+"");
        if(parent.getChildPosition(view) >= 0)

            outRect.top = resId;
    }
}
